package com.bookbuf.app;

import android.app.Application;
import android.content.Context;

import com.bookbuf.app.component.AppComponent;
import com.bookbuf.app.component.DaggerAppComponent;


/**
 * author: robert.
 * date :  2016/12/28.
 */

public class MainApplication extends Application {

    private AppComponent component;

    public static MainApplication get(Context context) {
        return ((MainApplication) context.getApplicationContext());
    }

    @Override
    public void onCreate() {
        super.onCreate();
        this.component = DaggerAppComponent.create();
    }

    public AppComponent getComponent() {
        return component;
    }

}
